/*
 * 1485. 生成给定大小的数组
 * 给你一个大小size,生成一个1-size的数组
 * https://www.lintcode.com/problem/generate-arraylist-with-given-size/description
 * 
 * 样例
 * size = 4. 返回 [1,2,3,4]
 * 
 * 2018.06.10 @jeyming
 */
package generate_arraylist_with_given_size_1485;

import java.util.ArrayList;
import java.util.List;

public class Generate_arraylist_with_given_size_1485 {

    /**
     * @param size: An integer
     * @return: An integer list
     */
    public List<Integer> generate(int size) {
        // write your code here
    	List<Integer> list = new ArrayList<Integer>();
    	for(int i = 1; i <= size; ++i) {
    		list.add(i);
    	}
    	return list;
    }
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
